package com.swu.cx.kotlinmodule

import com.swu.cx.kotlinmodule.proxy.RentCar
import com.swu.cx.kotlinmodule.proxy.RentHouse
import sun.misc.ProxyGenerator
import java.io.FileOutputStream

fun main() {
    proxy()
}
fun proxy() {
    val name = RentHouse::class.java.name + "\$Proxy0"
    val bytes = ProxyGenerator.generateProxyClass(name, arrayOf(RentHouse::class.java, RentCar::class.java))
    val fos = FileOutputStream("KotlinModule/$name.class")
    fos.write(bytes)
    fos.close()
}